﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using CustomControls.MiscControls;
using Infrasturcture.Global.Controls.Dialog;
using Infrasturcture.TouchLibrary;
using MallInteractiveMap.DTO;
using MallInteractiveMap.Language;

namespace CustomControls.Shop
{
    /// <summary>
    /// Interaction logic for ShopInformation.xaml
    /// </summary>
    public partial class ShopInformation : ADialogContent, IMTouchControl
    {
        #region Properties


        public string ShopInformationText
        {
            get { return (string)GetValue(ShopInformationTextProperty); }
            set { SetValue(ShopInformationTextProperty, value); }
        }

        public static readonly DependencyProperty ShopInformationTextProperty =
            DependencyProperty.Register("ShopInformationText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string ShopNoText
        {
            get { return (string)GetValue(ShopNoTextProperty); }
            set { SetValue(ShopNoTextProperty, value); }
        }

        public static readonly DependencyProperty ShopNoTextProperty =
            DependencyProperty.Register("ShopNoText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string ShopNameText
        {
            get { return (string)GetValue(ShopNameTextProperty); }
            set { SetValue(ShopNameTextProperty, value); }
        }

        public static readonly DependencyProperty ShopNameTextProperty =
            DependencyProperty.Register("ShopNameText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string CategoryNameText
        {
            get { return (string)GetValue(CategoryNameTextProperty); }
            set { SetValue(CategoryNameTextProperty, value); }
        }

        public static readonly DependencyProperty CategoryNameTextProperty =
            DependencyProperty.Register("CategoryNameText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string FloorNameText
        {
            get { return (string)GetValue(FloorNameTextProperty); }
            set { SetValue(FloorNameTextProperty, value); }
        }

        public static readonly DependencyProperty FloorNameTextProperty =
            DependencyProperty.Register("FloorNameText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string PhoneText
        {
            get { return (string)GetValue(PhoneTextProperty); }
            set { SetValue(PhoneTextProperty, value); }
        }

        public static readonly DependencyProperty PhoneTextProperty =
            DependencyProperty.Register("PhoneText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string DescriptionText
        {
            get { return (string)GetValue(DescriptionTextProperty); }
            set { SetValue(DescriptionTextProperty, value); }
        }

        public static readonly DependencyProperty DescriptionTextProperty =
            DependencyProperty.Register("DescriptionText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));



        public string SeePicturesText
        {
            get { return (string)GetValue(SeePicturesTextProperty); }
            set { SetValue(SeePicturesTextProperty, value); }
        }

        public static readonly DependencyProperty SeePicturesTextProperty =
            DependencyProperty.Register("SeePicturesText", typeof(string), typeof(ShopInformation), new UIPropertyMetadata(""));


        #endregion
        public ShopInformation()
        {
            DataContext = this;
            InitializeComponent();
            ShopInformationText = LanguageLoader.GetText("ShopInformationText");
            ShopNoText = LanguageLoader.GetText("ShopNoText");
            ShopNameText = LanguageLoader.GetText("ShopNameText");
            CategoryNameText = LanguageLoader.GetText("CategoryNameText");
            FloorNameText = LanguageLoader.GetText("FloorNameText");
            PhoneText = LanguageLoader.GetText("PhoneText");
            DescriptionText = LanguageLoader.GetText("DescriptionText");
            SeePicturesText = LanguageLoader.GetText("SeePicturesText");
        }

        public IMTContainer Container
        {
            get;
            set;
        }

        public DTOShop ShopData { get; set; }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            ShopNo.Text = string.Format("{0}: {1}", ShopNoText, ShopData.ShopNo);
            ShopName.Text = string.Format("{0}: {1}", ShopNameText, ShopData.Title);
            CategoryName.Text = string.Format("{0}: {1}", CategoryNameText, ShopData.CategoryName);
            FloorName.Text = string.Format("{0}: {1}", FloorNameText, ShopData.FloorName);
            Phone.Text = string.Format("{0}: {1}", PhoneText, ShopData.Phone);
            Description.Text = string.Format("{0}: {1}", DescriptionText, ShopData.Description);
        }
        
        public TouchButton SeePictureButton
        {
            get
            {
                return SeePicture;
            }
        }

        public string ShopNumber { get; set; }
    }
}
